/**
 * 配置编译环境和线上环境之间的切换
 *
 * baseUrl: 域名地址
 * routerMode: 路由模式
 * imgBaseUrl: 图片所在域名地址
 *
 */

let uleUrl = 'beta.ule.com'
let uleCdn = 'beta.ulecdn.com'
let staticUrl = ''
let vpsUrl = ''
let routerMode = 'hash'
let imgBaseUrl = ''


if (process.env.NODE_ENV == 'development') {
  imgBaseUrl = '/img/'
  uleUrl = 'beta.ule.com'
  uleCdn = 'beta.ulecdn.com'
	staticUrl = ''
  vpsUrl = ''

} else if (process.env.NODE_ENV == 'production') {
  if(location.host.indexOf('beta') != -1) {
    uleUrl = 'beta.ule.com'
    uleCdn = 'beta.ulecdn.com'
  } else {
    uleUrl = 'ule.com'
    uleCdn = 'ulecdn.com'
  }
  
  staticUrl = '//static-content.' + uleCdn
  vpsUrl = '//vps.' + uleUrl
	imgBaseUrl = '//elm.cangdu.org/img/'
}

export {
  uleUrl,
  uleCdn,
  staticUrl,
  vpsUrl,
  routerMode,
  imgBaseUrl
}
